/*
 * @Author: fah 1742484532@qq.com
 * @Date: 2024-09-13 16:43:59
 * @LastEditors: fah 1742484532@qq.com
 * @LastEditTime: 2024-09-14 09:32:15
 * @FilePath: \livetree-admin-server\src\auth\auth.module.ts
 * @Description: 指飞部-企业数字化管理系统
 * @version: 1.0
 */
import { Module } from '@nestjs/common';
import { AuthController } from './auth.controller';
import { AuthService } from './auth.service';
import { UsersService } from 'src/users/users.service';
import { UsersModule } from 'src/users/users.module';
import { TypeOrmModule } from '@nestjs/typeorm';
import { User } from 'src/users/entities/user.entity';
import { JwtModule } from '@nestjs/jwt';
import { HttpModule } from '@nestjs/axios';
import { jwtConstants } from './constants';

@Module({
  imports: [
    TypeOrmModule.forFeature([User]),
    UsersModule,
    HttpModule,
    JwtModule.register({
      global: true,
      secret: jwtConstants.secret,
      signOptions: { expiresIn: '60s' },
    }),
  ],
  controllers: [AuthController],
  providers: [AuthService, UsersService],
  exports: [AuthService],
})
export class AuthModule {}
